import request from '@/utils/request'
const fetchCates = (params = {}) => (
  request.get('/menaLists', { params })
)
const addFood = (params = {}) => (
  request.post('/addFood', params)
)
// 获取分类详情
const fetchDetail = id => {
  return request.get('/menaLists', { params: { id } })
}
// 修改商品分类
const updateFood = (params = {}) => {
  return request.put('/updateCate', params)
}
// 删除商品分类
const deleteFood = id => {
  return request.delete('/delCate', { params: { id } })
}
export {
  fetchCates,
  addFood,
  fetchDetail,
  updateFood,
  deleteFood
}
